Skip to content

fix: Improve watch command handling after closure #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kaushal-26
Copy link

@Kaushal-26 Kaushal-26 commented May 17, 2025

Running other watch command after killing first watch does not work

  • Handles multiple watch commands after killing one command, other executes as required

This update enables handling multiple watch commands for the same client after closing a previous watch connection.

  • Added IsClosed() method to all wire interfaces for connection state checks
  • Fixed watch connection handling to properly terminate watch loops
  • Added context support to TCPWire for graceful read interruption
  • Implemented CloseWatch() to properly close watch connections
  • Fixed IPv6 address handling with net.JoinHostPort
  • Improved error messages and code organization

Related PR: DiceDB/dice#1738

This update enables handling multiple watch commands for the same client after closing a previous watch connection.
- Added IsClosed() method to all wire interfaces for connection state checks
- Fixed watch connection handling to properly terminate watch loops
- Added context support to TCPWire for graceful read interruption
- Implemented CloseWatch() to properly close watch connections
- Fixed IPv6 address handling with net.JoinHostPort
- Improved error messages and code organization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant